Skip to content

perf: trim remaining Windows CI test hotspots#176

Merged
ScriptedAlchemy merged 3 commits into
masterfrom
perf/windows-slow-tests-2
Jul 1, 2026
Merged

perf: trim remaining Windows CI test hotspots#176
ScriptedAlchemy merged 3 commits into
masterfrom
perf/windows-slow-tests-2

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Follow-up to #174. The junit data from that run shows the remaining slow Windows tests are subprocess-spawn dominated (python3 via cmd shims, git, taskkill — each spawn ~100-500ms on Windows). This PR removes or consolidates those spawns:

  • Hermes plugin/bridge tests (agent_test, hermes_lcm_bridge_test — the 5.1s/4.6s top offenders and the 44.5s binary total): consolidate sequential python3 invocations into single scripts with attributable failures, and cache generated read-only plugin artifacts once per process.
  • Fake codex app-server / LSP tests (automation_backend_test, lsp_code_diagnostics_test): tighten fixture timeouts and polling; on Windows, skip the taskkill spawn when the child has already exited (src/sessions/codex_app_server.rs).
  • In-process gix instead of git spawns (src/branch.rs, src/worktree.rs, src/tracedecay.rs): current-branch, branch-exists, rev-list distance, remote URL, worktree root, and common-dir lookups now use gix, with a cheap .git-ancestor pre-flight before any remaining git fallback. Production code benefits too.
  • BPE tokenizer (Cargo.toml, src/dashboard/token_count.rs): compile tiktoken-rs/regex stack/base64 at opt-level 2 in dev/test builds (the 2.8s unit test is a one-time vocabulary decode + regex compile at -O0) and split the vocabulary test so each nextest process pays one model load.
  • Dashboard/eval fixtures (dashboard_lcm_fixes_test, memory_eval_test): reuse the cached empty-schema store template from perf: cut Windows CI test fixture overhead #174.

Verification

  • cargo fmt --all -- --check, git diff --check, conventional-commit check
  • Full validation delegated to CI per instruction (Linux/macOS/Windows matrix + clippy run everything)

Test plan

  • All CI checks green
  • Compare Windows shard times and junit per-test times against run 28550816318

Follow-up to #174 targeting the remaining slow Windows tests, which are
subprocess-spawn dominated:

- Consolidate sequential python3 invocations in hermes plugin/bridge tests
  and cache generated read-only artifacts per process.
- Tighten fake codex app-server and LSP fixture timeouts/polling; skip the
  taskkill spawn for already-exited children on Windows.
- Replace git subprocess spawns with in-process gix equivalents for
  current-branch, branch-exists, rev distance, remote URL, worktree root,
  and common-dir lookups, with a cheap .git-ancestor pre-flight before any
  remaining git fallback.
- Compile tiktoken-rs/regex/base64 at opt-level 2 in dev builds and split
  the BPE vocabulary unit test so each process pays one model load.
- Reuse the cached empty-schema store template in dashboard LCM fixes and
  memory eval fixtures.
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e5daee5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ScriptedAlchemy added 2 commits July 1, 2026 23:16
Consolidate the PYYAML_FALLBACK_PRELUDE/write_pyyaml_shim duplicates from
agent_test and hermes_lcm_bridge_test into tests/common, drop the now-unused
pyyaml_shim_pythonpath/python3_has_real_yaml probe helpers, and trim
repeated subprocess-cost annotations to the canonical git_may_resolve_repo
doc.
@ScriptedAlchemy ScriptedAlchemy merged commit 49aacde into master Jul 1, 2026
18 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the perf/windows-slow-tests-2 branch July 1, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant